<template>
    <div>
        <p>{{a}}</p>
        <button @click="a++">+1</button>
        <h2>当前鼠标位置为:x:{{point.x}} ,y: {{point.y}}</h2>
    </div>
</template>

<script>
import {ref} from 'vue'
import usePoint from './hooks/usePoint.js'
export default {
    name: 'App',
    components:{},
    setup(){
        let a = ref(0);
        let point = usePoint();//js-引入外部的数据、方法和钩子
        // js console.log(point)
        return{
            a,point
        }
    }
}
</script>

<style>

</style>